// ==================== 化工行业专业登录页面设计系统 ====================

// 🏭 化工行业专业设计变量 - 工业感与现代科技结合
:root {
  // 主色调 - 化工蓝与科技感
  --login-primary: #1e40af;        // 深蓝色 - 专业可靠
  --login-primary-hover: #1e3a8a;  // 更深蓝色
  --login-primary-light: #dbeafe;  // 浅蓝色
  --login-primary-dark: #1e3a8a;   // 深蓝色
  --login-accent: #059669;         // 绿色 - 环保安全
  --login-accent-light: #d1fae5;   // 浅绿色
  --login-warning: #d97706;        // 橙色 - 警示色
  --login-warning-light: #fed7aa;  // 浅橙色

  // 中性色系 - 工业灰调
  --login-text-primary: #1f2937;   // 深灰色
  --login-text-regular: #374151;   // 中灰色
  --login-text-secondary: #6b7280; // 浅灰色
  --login-text-placeholder: #9ca3af; // 占位符灰色
  --login-text-disabled: #d1d5db;  // 禁用灰色

  // 背景色系 - 现代工业风
  --login-bg-body: #f8fafc;        // 主背景
  --login-bg-card: #ffffff;        // 卡片背景
  --login-bg-light: #f1f5f9;       // 浅色背景
  --login-bg-illustration: #e2e8f0; // 插图背景
  --login-bg-pattern: #f8fafc;     // 图案背景

  // 边框色系
  --login-border: #e5e7eb;         // 主边框
  --login-border-light: #f3f4f6;   // 浅边框
  --login-border-lighter: #f9fafb; // 最浅边框
  --login-border-accent: #1e40af;  // 强调边框

  // 阴影系统 - 更深层次感
  --login-shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --login-shadow-base: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --login-shadow-dark: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --login-shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);

  // 圆角系统 - 现代工业风格
  --login-radius-small: 4px;
  --login-radius-base: 8px;
  --login-radius-large: 12px;
  --login-radius-xl: 16px;
  --login-radius-round: 24px;
}

// 🌙 化工行业暗黑模式 - 深色工业风
[data-theme='dark'] {
  --login-primary: #3b82f6;        // 亮蓝色
  --login-primary-hover: #60a5fa;  // 更亮蓝色
  --login-primary-light: rgba(59, 130, 246, 0.1);
  --login-primary-dark: #2563eb;   // 深蓝色
  --login-accent: #10b981;         // 亮绿色
  --login-accent-light: rgba(16, 185, 129, 0.1);
  --login-warning: #f59e0b;        // 亮橙色
  --login-warning-light: rgba(245, 158, 11, 0.1);

  --login-text-primary: #f9fafb;   // 几乎白色
  --login-text-regular: #e5e7eb;   // 浅灰色
  --login-text-secondary: #9ca3af; // 中灰色
  --login-text-placeholder: #6b7280; // 深灰色
  --login-text-disabled: #4b5563;  // 更深灰色

  --login-bg-body: #0f172a;        // 深蓝黑色
  --login-bg-card: #1e293b;        // 深蓝灰色
  --login-bg-light: #334155;       // 中蓝灰色
  --login-bg-illustration: #1e293b; // 插图背景
  --login-bg-pattern: #0f172a;     // 图案背景

  --login-border: #475569;         // 中灰色边框
  --login-border-light: #334155;   // 深灰色边框
  --login-border-lighter: #1e293b; // 最深边框
  --login-border-accent: #3b82f6;  // 强调边框

  --login-shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --login-shadow-base: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  --login-shadow-dark: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
  --login-shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.3);

  // 🌙 暗黑模式下的品牌标识区域
  .brand-header {
    background: rgba(30, 41, 59, 0.9) !important;
    border-color: var(--login-border) !important;
    box-shadow: var(--login-shadow-base) !important;

    .brand-logo {
      background: linear-gradient(135deg, var(--login-primary) 0%, var(--login-accent) 100%) !important;
      color: white !important;
      box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
    }

    .brand-text {
      color: var(--login-text-primary) !important;

      .brand-subtitle {
        color: var(--login-text-secondary) !important;
      }
    }
  }
}

// ==================== 主容器 - 化工行业专业设计 ====================
.login-container {
  min-height: 100vh;
  display: flex;
  position: relative;
  background: var(--login-bg-body);
  overflow: hidden;

  // 化工行业背景图案
  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
      // 分子结构图案
      radial-gradient(circle at 25% 25%, var(--login-primary-light) 2px, transparent 2px),
      radial-gradient(circle at 75% 75%, var(--login-accent-light) 1px, transparent 1px),
      // 网格图案
      linear-gradient(90deg, var(--login-border-light) 1px, transparent 1px),
      linear-gradient(var(--login-border-light) 1px, transparent 1px),
      // 渐变背景
      linear-gradient(135deg, var(--login-bg-body) 0%, var(--login-bg-pattern) 100%);
    background-size: 60px 60px, 40px 40px, 20px 20px, 20px 20px, 100% 100%;
    pointer-events: none;
    opacity: 0.4;
  }

  // 工业装饰元素
  &::after {
    content: '';
    position: absolute;
    top: 10%;
    right: 5%;
    width: 300px;
    height: 300px;
    background:
      radial-gradient(circle, var(--login-primary-light) 0%, transparent 70%),
      conic-gradient(from 0deg, var(--login-accent-light), var(--login-primary-light), var(--login-warning-light), var(--login-accent-light));
    border-radius: 50%;
    opacity: 0.1;
    pointer-events: none;
    animation: rotate 20s linear infinite;
  }

  // 品牌标识区域（左上角）
  .brand-header {
    position: absolute;
    top: 2rem;
    left: 2rem;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: var(--login-radius-large);
    box-shadow: var(--login-shadow-base);
    border: 1px solid var(--login-border-light);

    .brand-logo {
      width: 36px;
      height: 36px;
      border-radius: var(--login-radius-base);
      background: linear-gradient(135deg, var(--login-primary) 0%, var(--login-accent) 100%);
      display: flex;
      align-items: center;
      justify-content: center;
      color: white;
      font-weight: bold;
      font-size: 1.125rem;
    }

    .brand-text {
      font-size: 1.25rem;
      font-weight: 700;
      color: var(--login-text-primary);
      letter-spacing: -0.025em;

      .brand-subtitle {
        font-size: 0.75rem;
        font-weight: 400;
        color: var(--login-text-secondary);
        display: block;
        margin-top: -2px;
      }
    }
  }
}

// 主题化工样式兼容（保持向后兼容）
.login-container.theme-chemical {
  background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #475569 100%);

  &::before {
    background:
      radial-gradient(circle at 30% 70%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
      radial-gradient(circle at 70% 30%, rgba(16, 185, 129, 0.08) 0%, transparent 50%);
  }
}


// ==================== 左侧插图区域 - 化工行业工业设备设计 ====================
.login-illustration {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 3rem;
  background: var(--login-bg-illustration);
  position: relative;

  .illustration-content {
    max-width: 520px;
    text-align: center;
    z-index: 2;

    // 化工设备等距插图
    .isometric-illustration {
      position: relative;
      margin-bottom: 3rem;
      height: 320px;
      display: flex;
      align-items: center;
      justify-content: center;

      // 主要化工设备 - 反应釜
      .main-reactor {
        position: relative;
        z-index: 3;
        transform: perspective(800px) rotateX(20deg) rotateY(-20deg);

        .reactor-body {
          width: 160px;
          height: 200px;
          background: linear-gradient(135deg, var(--login-primary) 0%, var(--login-primary-dark) 100%);
          border-radius: var(--login-radius-xl) var(--login-radius-xl) var(--login-radius-large) var(--login-radius-large);
          box-shadow: var(--login-shadow-dark);
          position: relative;

          // 设备表面纹理
          &::before {
            content: '';
            position: absolute;
            top: 20px;
            left: 20px;
            right: 20px;
            bottom: 40px;
            background:
              linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
              linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
            background-size: 10px 10px;
            border-radius: var(--login-radius-base);
            border: 1px solid rgba(255, 255, 255, 0.2);
          }

          // 设备顶部
          &::after {
            content: '';
            position: absolute;
            top: -15px;
            left: 20px;
            right: 20px;
            height: 30px;
            background: linear-gradient(135deg, var(--login-accent) 0%, var(--login-primary) 100%);
            border-radius: var(--login-radius-xl);
            box-shadow: var(--login-shadow-base);
          }
        }

        .reactor-pipes {
          position: absolute;
          top: 50%;
          left: -30px;
          right: -30px;
          height: 8px;
          background: linear-gradient(90deg, var(--login-accent) 0%, var(--login-warning) 100%);
          border-radius: 4px;
          box-shadow: var(--login-shadow-base);

          &::before {
            content: '';
            position: absolute;
            left: -10px;
            top: -6px;
            width: 20px;
            height: 20px;
            background: var(--login-accent);
            border-radius: 50%;
            box-shadow: var(--login-shadow-base);
          }

          &::after {
            content: '';
            position: absolute;
            right: -10px;
            top: -6px;
            width: 20px;
            height: 20px;
            background: var(--login-warning);
            border-radius: 50%;
            box-shadow: var(--login-shadow-base);
          }
        }

        .control-panel {
          position: absolute;
          bottom: -20px;
          left: 50%;
          transform: translateX(-50%);
          width: 80px;
          height: 40px;
          background: var(--login-bg-card);
          border-radius: var(--login-radius-base);
          box-shadow: var(--login-shadow-base);
          border: 2px solid var(--login-border-accent);

          &::before {
            content: '';
            position: absolute;
            top: 8px;
            left: 8px;
            width: 8px;
            height: 8px;
            background: var(--login-accent);
            border-radius: 50%;
            animation: pulse 2s ease-in-out infinite;
          }

          &::after {
            content: '';
            position: absolute;
            top: 8px;
            right: 8px;
            width: 8px;
            height: 8px;
            background: var(--login-warning);
            border-radius: 50%;
            animation: pulse 2s ease-in-out infinite 1s;
          }
        }
      }

      // 工业监控设备
      .monitoring-devices {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;

        .device {
          position: absolute;
          width: 50px;
          height: 50px;
          background: var(--login-bg-card);
          border-radius: var(--login-radius-base);
          box-shadow: var(--login-shadow-base);
          display: flex;
          align-items: center;
          justify-content: center;
          font-size: 18px;
          border: 2px solid var(--login-border-accent);
          animation: float 4s ease-in-out infinite;

          &.device-1 {
            top: 10%;
            left: 10%;
            animation-delay: 0s;
            color: var(--login-primary);
          }
          &.device-2 {
            top: 15%;
            right: 15%;
            animation-delay: 1.5s;
            color: var(--login-accent);
          }
          &.device-3 {
            bottom: 20%;
            left: 5%;
            animation-delay: 3s;
            color: var(--login-warning);
          }
          &.device-4 {
            bottom: 10%;
            right: 10%;
            animation-delay: 0.8s;
            color: var(--login-primary);
          }
        }
      }

      // 数据传输线
      .data-lines {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;

        .line {
          position: absolute;
          height: 3px;
          background: linear-gradient(90deg, var(--login-primary), var(--login-accent));
          border-radius: 2px;
          opacity: 0.7;
          box-shadow: 0 0 10px rgba(30, 64, 175, 0.3);

          &.line-1 {
            top: 25%;
            left: 15%;
            width: 80px;
            transform: rotate(30deg);
            animation: dataFlow 3s ease-in-out infinite;
          }
          &.line-2 {
            top: 30%;
            right: 20%;
            width: 70px;
            transform: rotate(-25deg);
            animation: dataFlow 3s ease-in-out infinite 1s;
          }
          &.line-3 {
            bottom: 25%;
            left: 10%;
            width: 90px;
            transform: rotate(45deg);
            animation: dataFlow 3s ease-in-out infinite 2s;
          }
        }
      }
    }

    // 文字描述
    .illustration-text {
      .welcome-title {
        font-size: 2.5rem;
        font-weight: 800;
        background: linear-gradient(135deg, var(--login-primary) 0%, var(--login-accent) 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        margin-bottom: 1rem;
        line-height: 1.2;
        letter-spacing: -0.025em;
      }

      .welcome-subtitle {
        font-size: 1.25rem;
        color: var(--login-text-secondary);
        line-height: 1.6;
        margin: 0;
        font-weight: 500;
      }

      .industry-features {
        margin-top: 2rem;
        display: flex;
        justify-content: center;
        gap: 2rem;

        .feature {
          display: flex;
          flex-direction: column;
          align-items: center;
          gap: 0.5rem;

          .feature-icon {
            width: 40px;
            height: 40px;
            background: linear-gradient(135deg, var(--login-primary-light) 0%, var(--login-accent-light) 100%);
            border-radius: var(--login-radius-base);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
            color: var(--login-primary);
          }

          .feature-text {
            font-size: 0.875rem;
            color: var(--login-text-secondary);
            font-weight: 500;
          }
        }
      }
    }
  }
}

// ==================== 右侧登录表单区域 - 简约卡片设计 ====================
.login-form-container {
  width: 420px;
  min-height: 100vh;
  background: var(--login-bg-card);
  display: flex;
  flex-direction: column;
  box-shadow: var(--login-shadow-light);
  position: relative;
  z-index: 10;
  border-left: 1px solid var(--login-border-lighter);

  // 加载状态
  &.form-loading {
    opacity: 0.9;

    &::after {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(255, 255, 255, 0.8);
      backdrop-filter: blur(2px);
      z-index: 100;
    }
  }
}

// ==================== 登录头部 - 简约设计 ====================
.login-header {
  padding: 3rem 2.5rem 2rem;
  text-align: center;
  border-bottom: 1px solid var(--login-border-lighter);

  .logo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;

    .logo-image {
      width: 56px;
      height: 56px;
      object-fit: contain;
      border-radius: var(--login-radius-large);
      box-shadow: var(--login-shadow-base);
      transition: transform 0.3s ease;

      &:hover {
        transform: scale(1.05);
      }
    }

    .system-title {
      font-size: 1.5rem;
      font-weight: 600;
      color: var(--login-text-primary);
      margin: 0;
      letter-spacing: -0.025em;
    }
  }

  .login-actions {
    position: absolute;
    top: 2.5rem;
    right: 2.5rem;

    .back-icon {
      width: 40px;
      height: 40px;
      border-radius: var(--login-radius-round);
      background: var(--login-bg-light);
      border: 1px solid var(--login-border-light);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: all 0.2s ease;
      color: var(--login-text-secondary);

      &:hover {
        background: var(--login-primary-light);
        border-color: var(--login-primary);
        color: var(--login-primary);
        transform: translateY(-1px);
      }
    }
  }
}

// ==================== 登录表单内容 - 简约设计 ====================
.login-form-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 2.5rem 3rem;
}

.login-content {
  .login-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--login-text-primary);
    margin: 0 0 0.5rem 0;
    text-align: center;
    letter-spacing: -0.025em;
  }

  .login-subtitle {
    font-size: 1rem;
    color: var(--login-text-secondary);
    margin: 0 0 2.5rem 0;
    text-align: center;
    font-weight: 400;
  }

  // 简约标签页设计
  .login-tabs {
    margin-bottom: 2rem;

    :deep(.el-tabs__header) {
      margin: 0 0 2rem 0;
      border-bottom: 1px solid var(--login-border-light);
    }

    :deep(.el-tabs__nav-wrap) {
      padding: 0;
      background: var(--login-bg-light);
      border-radius: var(--login-radius-large);
      padding: 4px;
    }

    :deep(.el-tabs__item) {
      padding: 0 1.5rem;
      height: 40px;
      line-height: 40px;
      font-weight: 500;
      color: var(--login-text-secondary);
      border: none;
      font-size: 0.875rem;
      border-radius: var(--login-radius-base);
      transition: all 0.2s ease;
      margin: 0 2px;

      &.is-active {
        color: var(--login-primary);
        background: var(--login-bg-card);
        box-shadow: var(--login-shadow-base);
        font-weight: 600;
      }

      &:hover:not(.is-active) {
        color: var(--login-text-primary);
        background: rgba(255, 255, 255, 0.5);
      }
    }

    :deep(.el-tabs__active-bar) {
      display: none; // 隐藏默认的活动条，使用背景色代替
    }
  }

  // 简约第三方登录
  .third-party-login {
    margin-top: 2rem;
    text-align: center;

    .third-party-title {
      font-size: 0.875rem;
      color: var(--login-text-placeholder);
      margin-bottom: 1.5rem;
      position: relative;
      font-weight: 400;

      &::before,
      &::after {
        content: '';
        position: absolute;
        top: 50%;
        width: 60px;
        height: 1px;
        background: var(--login-border-light);
      }

      &::before { left: 0; }
      &::after { right: 0; }
    }

    .social-login-icons {
      display: flex;
      justify-content: center;
      gap: 1rem;

      .social-icon {
        width: 44px;
        height: 44px;
        border-radius: var(--login-radius-large);
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s ease;
        border: 1px solid var(--login-border-light);
        background: var(--login-bg-card);

        &.wechat {
          border-color: #07c160;
          color: white;

          &:hover {
            background: #06ad56;
            color: white;
            transform: translateY(-2px);
            box-shadow: var(--login-shadow-base);
          }
        }
      }
    }
  }

  // 简约注册链接
  .register-link {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.875rem;
    color: var(--login-text-secondary);

    .register-btn {
      color: var(--login-primary);
      text-decoration: none;
      font-weight: 500;
      margin-left: 0.5rem;
      transition: color 0.2s ease;

      &:hover {
        color: var(--login-primary-hover);
        text-decoration: underline;
      }
    }
  }
}

// ==================== 表单样式 ====================
.login-content-form {
  width: 100%;

  .el-form-item {
    margin-bottom: 1.5rem;

    &:last-child {
      margin-bottom: 0;
    }

    // 记住我行样式
    &.remember-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 2rem;

      .remember-checkbox {
        :deep(.el-checkbox__label) {
          font-size: 0.875rem;
          color: var(--login-text-secondary);
        }

        :deep(.el-checkbox__input.is-checked .el-checkbox__inner) {
          background-color: var(--login-primary);
          border-color: var(--login-primary);
        }
      }

      .forgot-password {
        font-size: 0.875rem;
        color: var(--login-primary);
        text-decoration: none;
        cursor: pointer;
        transition: color 0.2s ease;

        &:hover {
          color: var(--login-primary-hover);
          text-decoration: underline;
        }
      }
    }
  }

  // 表单项动画
  @for $i from 1 through 4 {
    .login-animation#{$i} {
      opacity: 0;
      animation: slideInUp 0.6s ease-out forwards;
      animation-delay: calc($i * 0.1s);
    }
  }
}

// 主题化工样式兼容
.theme-chemical .login-content-form {
  .el-form-item.remember-row {
    .remember-checkbox :deep(.el-checkbox__label) {
      color: rgba(255, 255, 255, 0.8);
    }

    .forgot-password {
      color: #60a5fa;

      &:hover {
        color: #93c5fd;
      }
    }
  }
}

// ==================== 化工行业专业输入框样式 ====================
.input-wrapper {
  position: relative;
  margin-bottom: 1.5rem;
}

.login-input {
  height: 56px;
  position: relative;

  :deep(.el-input) {
    height: 56px;
  }

  :deep(.el-input__wrapper) {
    background: var(--login-bg-card);
    border: 2px solid var(--login-border);
    border-radius: var(--login-radius-large);
    box-shadow: var(--login-shadow-inner);
    transition: all 0.3s ease;
    padding: 0 18px;
    height: 52px;
    position: relative;

    // 工业风格边框效果
    &::before {
      content: '';
      position: absolute;
      top: -2px;
      left: -2px;
      right: -2px;
      bottom: -2px;
      background: linear-gradient(135deg, var(--login-primary), var(--login-accent));
      border-radius: var(--login-radius-large);
      opacity: 0;
      transition: opacity 0.3s ease;
      z-index: -1;
    }

    &:hover {
      border-color: var(--login-border-accent);
      box-shadow: var(--login-shadow-base);
      transform: translateY(-1px);

      &::before {
        opacity: 0.1;
      }
    }

    &.is-focus {
      border-color: var(--login-primary);
      box-shadow:
        var(--login-shadow-base),
        0 0 0 4px rgba(30, 64, 175, 0.1);

      &::before {
        opacity: 0.2;
      }
    }

    // 错误状态
    &.is-error {
      border-color: #ef4444;
      box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);

      &::before {
        background: linear-gradient(135deg, #ef4444, #dc2626);
        opacity: 0.15;
      }
    }

    // 有内容时的样式增强
    &.has-content {
      background: linear-gradient(135deg,
        var(--login-bg-card) 0%,
        rgba(30, 64, 175, 0.02) 100%);
      border-color: var(--login-border-accent);

      &::before {
        opacity: 0.08;
      }

      // 内部光效
      &::after {
        content: '';
        position: absolute;
        top: 1px;
        left: 1px;
        right: 1px;
        bottom: 1px;
        background: linear-gradient(135deg,
          rgba(255, 255, 255, 0.1) 0%,
          transparent 50%,
          rgba(255, 255, 255, 0.05) 100%);
        border-radius: calc(var(--login-radius-large) - 1px);
        pointer-events: none;
        opacity: 0.5;
      }
    }
  }

  :deep(.el-input__inner) {
    font-size: 0.9rem !important;
    color: var(--login-text-primary) !important;
    height: 48px;
    line-height: 48px;
    background: transparent !important;
    border: none;
    box-shadow: none;
    font-weight: 500 !important;
    padding: 0;
    position: relative;
    z-index: 1;

    &::placeholder {
      color: var(--login-text-placeholder) !important;
      font-weight: 400;
      font-size: 0.875rem;
      transition: all 0.3s ease;
    }

    // 修复自动填充样式问题 - 关键优化
    &:-webkit-autofill,
    &:-webkit-autofill:hover,
    &:-webkit-autofill:focus,
    &:-webkit-autofill:active {
      -webkit-box-shadow: 0 0 0 1000px var(--login-bg-card) inset !important;
      -webkit-text-fill-color: var(--login-text-primary) !important;
      transition: background-color 5000s ease-in-out 0s !important;
      border: none !important;
      font-weight: 500 !important;
      font-size: 0.9rem !important;
      color: var(--login-text-primary) !important;
    }

    // 确保输入文字始终可见 - 重要修复
    &:not(:placeholder-shown) {
      color: var(--login-text-primary) !important;
      background: transparent !important;
      font-weight: 500 !important;
      font-size: 0.9rem !important;
    }

    // 聚焦时占位符效果
    &:focus {
      color: var(--login-text-primary) !important;

      &::placeholder {
        opacity: 0.5;
        transform: translateX(4px);
      }
    }

    // 输入状态下的样式 - 强制设置颜色
    &:valid,
    &:invalid {
      color: var(--login-text-primary) !important;
      font-weight: 500 !important;
      background: transparent !important;
    }

    // 强制覆盖任何可能的白色文字样式
    &[style*="color: white"],
    &[style*="color: #fff"],
    &[style*="color: #ffffff"] {
      color: var(--login-text-primary) !important;
    }
  }

  :deep(.el-input__prefix) {
    display: flex;
    align-items: center;
    padding-right: 16px;
    z-index: 2;

    .input-icon {
      color: var(--login-text-secondary);
      font-size: 1.25rem;
      transition: all 0.3s ease;
      position: relative;

      // 图标光效
      &::after {
        content: '';
        position: absolute;
        top: -3px;
        left: -3px;
        right: -3px;
        bottom: -3px;
        background: radial-gradient(circle, var(--login-primary) 0%, transparent 70%);
        opacity: 0;
        transition: opacity 0.3s ease;
        border-radius: 50%;
      }
    }
  }

  :deep(.el-input__suffix) {
    z-index: 2;

    .el-input__suffix-inner {
      .el-input__clear,
      .el-input__password {
        color: var(--login-text-secondary);
        font-size: 1.125rem;
        transition: all 0.3s ease;
        position: relative;

        &:hover {
          color: var(--login-primary);
          transform: scale(1.15);
        }

        &::after {
          content: '';
          position: absolute;
          top: -2px;
          left: -2px;
          right: -2px;
          bottom: -2px;
          background: var(--login-primary-light);
          opacity: 0;
          transition: opacity 0.3s ease;
          border-radius: 50%;
        }

        &:hover::after {
          opacity: 0.3;
        }
      }
    }
  }

  // 聚焦状态优化
  &:focus-within {
    :deep(.el-input__prefix .input-icon) {
      color: var(--login-primary);
      transform: scale(1.1);

      &::after {
        opacity: 0.15;
      }
    }
  }

  // 输入框状态指示器
  .input-status-indicator {
    position: absolute;
    top: 50%;
    right: 50px;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--login-accent);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 3;

    &.active {
      opacity: 1;
      animation: pulse 2s ease-in-out infinite;
    }

    &.error {
      background: #ef4444;
    }

    &.success {
      background: var(--login-accent);
    }
  }

  // 输入框标签
  .input-label {
    position: absolute;
    top: -8px;
    left: 16px;
    background: var(--login-bg-card);
    padding: 0 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--login-text-secondary);
    z-index: 1;
    transition: color 0.3s ease;
  }

  &:focus-within .input-label {
    color: var(--login-primary);
  }
}

// ==================== 输入框文字颜色修复 ====================
// 强制确保输入框文字在所有情况下都可见
.login-input,
.login-content-form .login-input,
.el-form .login-input {
  :deep(.el-input__inner) {
    // 强制设置文字颜色，覆盖任何可能的冲突样式
    color: var(--login-text-primary) !important;

    // 确保在所有状态下文字都可见
    &:focus,
    &:active,
    &:hover,
    &[value]:not([value=""]) {
      color: var(--login-text-primary) !important;
    }
  }
}

// 特别针对Element Plus输入框的修复
.el-input__inner {
  color: var(--login-text-primary) !important;

  &:focus,
  &:active,
  &:hover {
    color: var(--login-text-primary) !important;
  }
}

// 全局强制修复 - 确保所有输入框文字可见
input[type="text"],
input[type="password"],
input[type="email"],
.el-input input,
.el-input__inner,
.login-input input,
.login-input .el-input__inner {
  color: var(--login-text-primary) !important;

  &:focus,
  &:active,
  &:hover,
  &:valid,
  &:invalid {
    color: var(--login-text-primary) !important;
  }
}

// 覆盖任何可能的白色文字样式
.login-container input,
.login-form-container input,
.login-content-form input {
  color: var(--login-text-primary) !important;

  &[style*="color: white"],
  &[style*="color: #fff"],
  &[style*="color: #ffffff"],
  &[style*="color: rgba(255, 255, 255"] {
    color: var(--login-text-primary) !important;
  }
}

// 移除可能导致文字颜色冲突的主题样式
// 确保输入框文字始终使用正确的颜色变量

// ==================== 化工行业专业按钮样式 ====================
.login-content-submit {
  width: 100%;
  height: 56px;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: var(--login-radius-large);
  background: linear-gradient(135deg, var(--login-primary) 0%, var(--login-accent) 100%);
  border: 2px solid var(--login-primary);
  color: white;
  box-shadow: var(--login-shadow-base);
  transition: all 0.3s ease;
  margin-top: 1rem;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.05em;
  text-transform: uppercase;

  // 工业风格装饰条纹
  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background:
      linear-gradient(45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%);
    transition: left 0.6s ease;
  }

  // 按钮内部光效
  &::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.2) 0%,
      transparent 50%,
      rgba(255, 255, 255, 0.1) 100%);
    border-radius: calc(var(--login-radius-large) - 2px);
    pointer-events: none;
  }

  &:hover {
    background: linear-gradient(135deg, var(--login-primary-hover) 0%, var(--login-accent) 100%);
    transform: translateY(-2px);
    box-shadow:
      var(--login-shadow-dark),
      0 0 20px rgba(30, 64, 175, 0.3);
    border-color: var(--login-primary-hover);

    &::before {
      left: 100%;
    }
  }

  &:active {
    transform: translateY(-1px);
    box-shadow: var(--login-shadow-base);
  }

  &.is-loading {
    background: linear-gradient(135deg, var(--login-text-secondary) 0%, var(--login-text-placeholder) 100%);
    border-color: var(--login-text-secondary);
    cursor: not-allowed;
    transform: none;

    &::before {
      display: none;
    }

    &:hover {
      background: linear-gradient(135deg, var(--login-text-secondary) 0%, var(--login-text-placeholder) 100%);
      transform: none;
      box-shadow: var(--login-shadow-base);
      border-color: var(--login-text-secondary);
    }
  }

  // 按钮文字
  .button-text {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;

    .button-icon {
      font-size: 1rem;
      transition: transform 0.3s ease;
    }
  }

  &:hover .button-text .button-icon {
    transform: translateX(2px);
  }
}

// 主题化工样式兼容
.theme-chemical .login-content-submit {
  background: linear-gradient(135deg, #60a5fa 0%, #34d399 100%);
  border: 1px solid #60a5fa;

  &:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #10b981 100%);
    border-color: #3b82f6;
  }

  &.is-loading {
    background: var(--login-text-secondary);
    border-color: var(--login-text-secondary);

    &:hover {
      background: var(--login-text-secondary);
      border-color: var(--login-text-secondary);
    }
  }
}

// ==================== 版权信息样式 ====================
.copyright {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  animation: fadeIn 1s ease-out 1.5s both;

  p {
    font-size: 0.75rem;
    color: var(--login-text-placeholder);
    margin: 0;
    text-align: center;
    font-weight: 400;
    opacity: 0.8;
  }
}

// ==================== 动画定义 ====================
@keyframes slideInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(2deg);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
  }
}

@keyframes lineGlow {
  0%, 100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 8px var(--login-primary);
  }
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes dataFlow {
  0%, 100% {
    opacity: 0.7;
    box-shadow: 0 0 10px rgba(30, 64, 175, 0.3);
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 20px rgba(30, 64, 175, 0.6);
    transform: scale(1.05);
  }
}

// ==================== 响应式设计 - 简约适配 ====================
@media (max-width: 1024px) {
  .login-container {
    flex-direction: column;

    .brand-header {
      position: relative;
      top: auto;
      left: auto;
      padding: 1.5rem 2rem 0;
      justify-content: center;
    }
  }

  .login-illustration {
    flex: none;
    min-height: 40vh;
    padding: 2rem;

    .illustration-content {
      .isometric-illustration {
        height: 200px;
        margin-bottom: 2rem;

        .main-platform {
          transform: perspective(400px) rotateX(10deg) rotateY(-10deg);

          .platform-base {
            width: 140px;
            height: 140px;
          }
        }

        .floating-blocks .data-block {
          width: 35px;
          height: 35px;
          font-size: 14px;
        }
      }

      .illustration-text {
        .welcome-title {
          font-size: 1.75rem;
        }

        .welcome-subtitle {
          font-size: 1rem;
        }
      }
    }
  }

  .login-form-container {
    width: 100%;
    min-height: 60vh;
  }
}

@media (max-width: 768px) {
  .login-illustration {
    min-height: 35vh;
    padding: 1.5rem;

    .illustration-content {
      .isometric-illustration {
        height: 150px;
        margin-bottom: 1.5rem;

        .main-device .device-screen {
          width: 120px;
          height: 84px;
        }

        .main-device .device-base {
          width: 132px;
        }

        .connection-lines .connection-node {
          width: 30px;
          height: 30px;
          font-size: 14px;
        }

        .floating-elements .floating-card {
          width: 35px;
          height: 35px;
          font-size: 14px;
        }
      }

      .illustration-text {
        .main-title {
          font-size: 1.25rem;
        }

        .subtitle {
          font-size: 0.875rem;
        }
      }
    }
  }

  .login-form-container {
    min-height: 65vh;
  }

  .login-header {
    padding: 1.5rem 1.5rem 1rem;

    .logo-section {
      .logo-image {
        width: 40px;
        height: 40px;
      }

      .system-title {
        font-size: 1.25rem;
      }
    }

    .login-actions {
      top: 1.5rem;
      right: 1.5rem;

      .back-icon {
        width: 36px;
        height: 36px;
      }
    }
  }

  .login-form-content {
    padding: 0 1.5rem 1.5rem;
  }

  .login-content {
    .login-title {
      font-size: 1.5rem;
    }

    .login-subtitle {
      font-size: 0.875rem;
    }

    .third-party-login .third-party-title {
      &::before,
      &::after {
        width: 60px;
      }
    }
  }

  .login-input {
    height: 44px;

    :deep(.el-input) {
      height: 44px;
    }

    :deep(.el-input__wrapper) {
      height: 42px;
    }

    :deep(.el-input__inner) {
      height: 40px;
      line-height: 40px;
      font-size: 0.875rem;
    }
  }

  .login-content-submit {
    height: 44px;
    font-size: 0.875rem;
  }

  .copyright {
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    padding: 1rem;
    background: var(--login-bg-card);

    p {
      font-size: 0.75rem;
      color: var(--login-text-placeholder);
    }
  }
}

@media (max-width: 480px) {
  .login-illustration {
    min-height: 30vh;
    padding: 1rem;

    .illustration-content {
      .isometric-illustration {
        height: 120px;
        margin-bottom: 1rem;

        .main-device .device-screen {
          width: 100px;
          height: 70px;
        }

        .main-device .device-base {
          width: 110px;
        }
      }

      .illustration-text {
        .main-title {
          font-size: 1.125rem;
        }

        .subtitle {
          font-size: 0.8rem;
        }
      }
    }
  }

  .login-header {
    padding: 1rem;

    .logo-section {
      gap: 0.75rem;

      .logo-image {
        width: 36px;
        height: 36px;
      }

      .system-title {
        font-size: 1.125rem;
      }
    }

    .login-actions {
      top: 1rem;
      right: 1rem;

      .back-icon {
        width: 32px;
        height: 32px;
      }
    }
  }

  .login-form-content {
    padding: 0 1rem 1rem;
  }

  .login-content {
    .login-title {
      font-size: 1.25rem;
    }

    .login-tabs {
      :deep(.el-tabs__item) {
        padding: 0 0.75rem;
        font-size: 0.8rem;
      }
    }

    .third-party-login .third-party-title {
      &::before,
      &::after {
        width: 40px;
      }
    }
  }

  .login-content-form {
    .el-form-item {
      margin-bottom: 1.25rem;

      &.remember-row {
        margin-bottom: 1.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
      }
    }
  }

  .login-input {
    height: 42px;

    :deep(.el-input) {
      height: 42px;
    }

    :deep(.el-input__wrapper) {
      height: 40px;
      padding: 0 10px;
    }

    :deep(.el-input__inner) {
      height: 38px;
      line-height: 38px;
      font-size: 0.8rem;
    }

    :deep(.el-input__prefix) {
      padding-right: 6px;

      .input-icon {
        font-size: 1rem;
      }
    }
  }

  .login-content-submit {
    height: 42px;
    font-size: 0.8rem;
  }
}

// ==================== 输入框包装器增强样式 ====================
.input-wrapper {
  position: relative;

  // 浮动标签样式优化
  .input-label {
    position: absolute;
    top: -10px;
    left: 18px;
    background: var(--login-bg-card);
    padding: 0 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--login-text-secondary);
    z-index: 3;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(4px);
    border-radius: 4px;

    &.active {
      opacity: 1;
      transform: translateY(0);
      color: var(--login-primary);
      background: linear-gradient(135deg, var(--login-bg-card) 0%, var(--login-primary-light) 100%);
      box-shadow: 0 2px 4px rgba(30, 64, 175, 0.1);
    }
  }

  // 输入状态指示器增强
  .input-status-indicator {
    position: absolute;
    top: 50%;
    right: 50px;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--login-accent);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 3;
    box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.2);

    &.active {
      opacity: 1;
      animation: pulse 2s ease-in-out infinite;
    }

    &.error {
      background: #ef4444;
      box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
    }

    &.success {
      background: var(--login-accent);
      box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.2);
    }
  }

  // 输入框有内容时的包装器样式
  &.has-content {
    .login-input :deep(.el-input__wrapper) {
      background: linear-gradient(135deg,
        var(--login-bg-card) 0%,
        rgba(30, 64, 175, 0.02) 100%);
      border-color: var(--login-border-accent);

      &::before {
        opacity: 0.08;
      }

      // 内部光效
      &::after {
        content: '';
        position: absolute;
        top: 1px;
        left: 1px;
        right: 1px;
        bottom: 1px;
        background: linear-gradient(135deg,
          rgba(255, 255, 255, 0.1) 0%,
          transparent 50%,
          rgba(255, 255, 255, 0.05) 100%);
        border-radius: calc(var(--login-radius-large) - 1px);
        pointer-events: none;
        opacity: 0.5;
      }
    }
  }
}

// 暗黑模式下的输入框包装器
[data-theme='dark'] .input-wrapper {
  .input-label {
    background: var(--login-bg-card);

    &.active {
      background: linear-gradient(135deg, var(--login-bg-card) 0%, rgba(59, 130, 246, 0.1) 100%);
      box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
    }
  }
}
